package com.sunjob.loginserver.service;

import com.sunjob.common.domain.loginServer.SysRole;
import com.sunjob.loginserver.mapper.SysRoleMapper;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-07-26 14:21
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    SysRoleMapper sysRoleMapper;
    @Override
    public List<String> queryRoleIdByLoginId(Long id) {
        return sysRoleMapper.queryRoleIdByLoginId(id);
    }

    @Override
    public List<SysRole> queryAllRole() {
        return sysRoleMapper.queryAllRole();
    }

    @Override
    public Integer addRole(Long userId, int i) {
        return sysRoleMapper.addRole(userId,i);
    }
}
